
<div id="main">
  
  <% if flash[:notice] %>
    <div> <%=h flash[:notice] %> </div>
  <% end %>
  
  <div>
    <h2>Books that Match my needed books</h2>
    <p>BookTrader has performed a search of all the books in the Database that match the books you need with the books you are willing to trade.</p>
    <ul>
      <% for book in @matches %>
        <li>
          <ul>
        <li><%= link_to h(book.title), :controller => "book", :action => "show", :id => book.id%></li>
        <li><%= h(book.isbn) %></li>
        <li><%= Condition.find(book.condition_id).title %></li>
        <li><%= link_to "Make an Offer", :controller => "offer", :action => "new", :id => book.id %></li>
          </ul>
        </li>
        
      <% end %>
    </ul>
     
  </div>
  
 
  
</div>

<div id="sub">
  <div>
    <h3>User Menu</h3>
    <ul>
      <li><%= link_to("My Books", :controller => "user", :action => "mybooks")%></li>
      <li><%= link_to("Add a Book", :controller => "book", :action => "new")%></li>
      <li><%= link_to("Match Maker", :controller => "user", :action => "mymatch")%></li>
      <li><%= link_to("My Offers", :controller => "user", :action => "offers")%></li>
    </ul>
  </div>
  
</div>

